<?php 
	$id=$reply["id"];//id
	$status=$reply["status"];//活动状态
	$huodongname=$reply["huodongname"];//活动名称
	$huodongdesc=$reply["huodongdesc"];//活动说明
	$huodongurl=$reply["huodongurl"];//活动链接
	$hdpicture=$reply["hdpicture"];//活动图片
	$subscribe=$reply["subscribe"];//是否强制需要关注公众号才能参与
	$sharetitle=$reply["sharetitle"];//分享标题
	$shareimg=$reply["shareimg"];//分享图片
	$sharecontent=$reply["sharecontent"];//分享简介
	$start_time=$reply["start_time"];//开始时间
	$end_time=$reply["end_time"];//结束时间
	$followdesc=$reply["followdesc"];//关注说明
	$qrcode==$reply["qrcode"];//关注二维码
	$questioncount=$reply["questioncount"];//问题数量
	$questiontime=$reply["questiontime"];//每道题的答题时间（秒）
	$isrand=$reply["isrand"];//是否随机
	$isshareadd=$reply["isshareadd"];//是否支持分享增加1次答题
	$dtcount=$reply["dtcount"];//默认答题次数	

	$qyname=$reply["qyname"];//企业名称
	$qylogo=$reply["qylogo"];//企业logo
	$qylink=$reply["qylink"];//企业链接
	$homebg=$reply["homebg"];//首页背景图
	$zongfen=$reply["zongfen"];//总分数
	$color=$reply["color"];//主题颜色
	$isjl=$reply["isjl"];//是否开启奖励
	$jltype=$reply["jltype"];//奖励方式
	$jlnum=$reply["jlnum"];//奖励数
	$jlcontent=$reply["jlcontent"];//奖励提示语
	$hxnum=$reply["hxnum"];//核销码
	$iswanshan=$reply["iswanshan"];//是否需要完善信息
	$phbnum=$reply["phbnum"];//排行榜显示数
	$phbimg=$reply["phbimg"];//排行榜图片
	$music=$reply["music"];//音乐
$zongfen1=$reply["zongfen1"];
	$maxcount=$reply["maxcount"];//次数上限
	$xncount=$reply["xncount"];
	$qrcode = $reply["qrcode"];
    $shareurl=$reply["shareurl"];
 $root_openid=$reply["root_openid"]
?>
<input type="hidden" name="reply_id" value="{$id}" />
<div class="panel panel-default">
	
	<div class="panel-body">
		{if $huodongurl!=""}
		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span style='color: red'>*</span> 活动链接地址</label>
			<div class="col-sm-9 col-xs-12">
				<textarea style="height: 60px;" id='huodongurl' name="huodongurl" class="form-control" readonly="readonly" cols="60">{$huodongurl}</textarea>
			</div>
		</div>
		{/if}
		<div class="form-group">
			<label class="col-xs-12 col-sm-2 col-md-2  control-label"><span style='color: red'>*</span>活动状态</label>
			<div class="col-sm-8">
				<label class="radio-inline"> 
					<input type="radio" name="status" value="1" {if $status== 1} checked="checked" {/if}/>开始活动
				</label>
				<label class="radio-inline"> 
				 	<input type="radio" name="status" value="0" {if $status== 0} checked="checked" {/if}/>关闭活动
				</label>

			</div>
		</div>

<!-- 
<div class="form-group">
			<label class="col-xs-12 col-sm-2 col-md-2  control-label"><span style='color: red'>*</span>是否强制关注</label>
			<div class="col-sm-8">
				<label class="radio-inline"> 
					<input type="radio" name="subscribe" value="1" {if $subscribe ==1} checked="checked" {/if}/>是
				</label> 
				<label class="radio-inline"> 
					<input type="radio" name="subscribe" value="0" {if $subscribe ==0} checked="checked" {/if}/>否
				</label>

			</div>
		</div>
 -->
		
		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span style='color: red'>*</span> 活动名称</label>
			<div class="col-sm-9 col-xs-12">
				<input type="text" id="title" class="form-control" placeholder="" name="huodongname" value="{$huodongname}">
			</div>
		</div>

		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span style='color: red'>*</span> 活动规则</label>
			<div class="col-sm-9 col-xs-12">
				<textarea style="height:300px;" id='huodongdesc' name="huodongdesc"  class="form-control richtext">{$huodongdesc}</textarea>
			</div>
		</div>
		
		<div class="form-group">
			<label class="col-xs-12 col-sm-2 col-md-2  control-label"><span style='color: red'>*</span>活动图片</label>
			<div class="col-sm-8">
				{php echo tpl_form_field_image('hdpicture', $hdpicture)}
				<span style="color:red;">图片大小：640*340,<font color="red">
				</font>
</span>
			</div>
		</div>

		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span style='color: red'>*</span> 活动时间</label>
			<div class="col-sm-9 col-xs-12">
				{php echo tpl_form_field_daterange('datelimit', array('start'=>date('Y-m-d H:i',$start_time),'end'=>date('Y-m-d H:i',$end_time)), true)}
			</div>
		</div>
		<div class="form-group" style="margin-top: 5px;">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span
				style='color: red'>*</span>答对宝藏奖励</label>
			<div class="col-sm-9 col-xs-12">
			<div class="input-group">
				  <span class="input-group-addon">最低</span>
            <input type="text" name="zongfen1" id="zongfen1" class="form-control valid" value="{$zongfen1}" >
            <span class="input-group-addon">最高</span>
            <input type="text" name="zongfen2" id="zongfen" class="form-control" value="{$zongfen}">
            
            </div>
			</div>
		</div>
		<div class="form-group" style="margin-top: 5px;">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span
				style='color: red'>*</span>问题数量</label>
			<div class="col-sm-9 col-xs-12">
				<input type="text" id="questioncount" class="form-control" placeholder="" name="questioncount" value="{$questioncount}">
			</div>
		</div>
		
		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span style='color: red'>*</span> 一道题回答时间（秒）</label>
			<div class="col-sm-9 col-xs-12">
				<input type="text" id="questiontime" class="form-control" placeholder="" name="questiontime" value="{$questiontime}">
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span style='color: red'>*</span> 每天可答题次数</label>
			<div class="col-sm-9 col-xs-12">
				<input type="text" id="dtcount" class="form-control" placeholder="" name="dtcount" value="{$dtcount}">
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span style='color: red'>*</span> 答案揭密页面链接</label>
			<div class="col-sm-9 col-xs-12">
				<input type="text" id="shareurl" class="form-control" placeholder="" name="shareurl" value="{$shareurl}">
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span style='color: red'>*</span> 核销管理员openid(多个管理员用英文,号分格)</label>
			<div class="col-sm-9 col-xs-12">
			<textarea style="height: 60px;" id='sharecontent'
					name="root_openid" class="form-control" cols="60">{$root_openid}</textarea>
			</div>
		</div>
	<!-- 
	<div class="form-group">
			<label class="col-xs-12 col-sm-2 col-md-2  control-label"><span style='color: red'>*</span>是否随机</label>
			<div class="col-sm-8">
				<label class="radio-inline"> 
					<input type="radio" name="isrand" value="1" {if $isrand== 1} checked="checked" {/if}/>是
				</label>
				<label class="radio-inline"> 
				 	<input type="radio" name="isrand" value="0" {if $isrand== 0} checked="checked" {/if}/>否
				</label>

			</div>
		</div>
	 -->
		
		<!-- 
		<div class="form-group">
			<label class="col-xs-12 col-sm-2 col-md-2  control-label"><span style='color: red'>*</span>是否支持分享增加1次答题</label>
			<div class="col-sm-8">
				<label class="radio-inline"> 
					<input type="radio" name="isshareadd" value="1" {if $isshareadd== 1} checked="checked" {/if}/>是
				</label>
				<label class="radio-inline"> 
				 	<input type="radio" name="isshareadd" value="0" {if $isshareadd== 0} checked="checked" {/if}/>否
				</label>

			</div>
		</div>
		
		<div class="form-group">
			<label class="col-xs-12 col-sm-2 col-md-2  control-label"><span style='color: red'>*</span>增加次数上限</label>
			<div class="col-sm-9 col-xs-12">
				<input type="text" id="maxcount" class="form-control" placeholder="" name="maxcount" value="{$maxcount}">
				<span style="color:red;">分享给好友，增加答题次数的上限，为空或者0则不限制。</span>
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-12 col-sm-2 col-md-2  control-label"><span style='color: red'>*</span>虚拟人数</label>
			<div class="col-sm-9 col-xs-12">
				<input type="text" id="xncount" class="form-control" placeholder="" name="xncount" value="{$xncount}">
			</div>
		</div>
		 -->
		
		
		
		<!-- 
		<div class="form-group">
			<label class="col-xs-12 col-sm-2 col-md-2  control-label"><span style='color: red'>*</span>首页背景图</label>
			<div class="col-sm-8">
				{php echo tpl_form_field_image('homebg', $homebg)}
				<span style="color:red;">图片大小：640*603</span>
			</div>
		</div>
		
		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span style='color:red'>*</span>主题颜色</label>
			<div class="col-sm-9 col-xs-12">
				<select name="color" class="form-control" id="color" >
					<option value="" {if $color==""}selected="selected"{/if}>蓝色 </option>
					<option value="green"{if $color=="green"}selected="selected"{/if}>绿色 </option>	
					<option value="purple"{if $color=="purple"}selected="selected"{/if}>紫色 </option>
					<option value="red"{if $color=="red"}selected="selected"{/if}>红色 </option>
					<option value="yellow"{if $color=="yellow"}selected="selected"{/if}>黄色 </option>						
				</select>
				<div class="help-block"></div>
			</div>
		</div>
		 -->
		
		<!-- 
		
		<div class="form-group">
			<label class="col-xs-12 col-sm-2 col-md-2  control-label"><span style='color: red'>*</span>是否需要完善信息</label>
			<div class="col-sm-8">
				<label class="radio-inline"> 
					<input type="radio" name="iswanshan" value="1" {if $iswanshan== 1} checked="checked" {/if}/>是
				</label>
				<label class="radio-inline"> 
				 	<input type="radio" name="iswanshan" value="0" {if $iswanshan== 0} checked="checked" {/if}/>否
				</label>

			</div>
		</div>
		 -->
		
		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span style='color: red'>*</span> 排行榜显示数</label>
			<div class="col-sm-9 col-xs-12">
				<input type="text" id="phbnum" class="form-control" placeholder="" name="phbnum" value="{$phbnum}">
			</div>
		</div>
		<!-- 
			<div class="form-group">
			<label class="col-xs-12 col-sm-2 col-md-2  control-label"><span style='color: red'>*</span>排行榜图片</label>
			<div class="col-sm-8">
				{php echo tpl_form_field_image('phbimg', $phbimg)}
				<span style="color:red;">图片大小：640*603</span>
			</div>
		</div>
		 -->
	 <!-- 
	 	<div class="form-group">
			<label class="col-xs-12 col-sm-2 col-md-2  control-label"><span style='color:red'>*</span>背景音乐</label>
			<div class="col-sm-8">
				{php echo tpl_form_field_audio('music', $music)}
			</div>		
		</div>
	  -->
	
	</div>
</div>

<div class="panel panel-default">
	<div class="panel-heading">分享设置</div>
	<div class="panel-body">
		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span
				style='color: red'>*</span>分享标题</label>
			<div class="col-sm-9 col-xs-12">
				<input type="text" id="sharetitle" name="sharetitle"
					class="form-control" value="{$sharetitle}">
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-12 col-sm-2 col-md-2  control-label"><span
				style='color: red'>*</span>分享图片</label>
			<div class="col-sm-8">
				{php echo tpl_form_field_image('shareimg', $shareimg)}
				<span style="color:red;">正方形，建议图片大小：100*100</span>
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span
				style='color: red'>*</span>分享简介</label>
			<div class="col-sm-9 col-xs-12">
				<textarea style="height: 60px;" id='sharecontent'
					name="sharecontent" class="form-control" cols="60">{$sharecontent}</textarea>
			</div>
		</div>
	</div>
</div>

<!-- 
<div class="panel panel-default" id="followdiv">
	<div class="panel-heading">关注设置</div>
	<div class="panel-body">
		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span
				style='color: red'>*</span>关注说明</label>
			<div class="col-sm-9 col-xs-12">
				<input type="text" id="followdesc" class="form-control"
					placeholder="" name="followdesc" value="{$followdesc}">
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-12 col-sm-2 col-md-2  control-label"><span
				style='color: red'>*</span>关注二维码</label>
			<div class="col-sm-8">
				{php echo tpl_form_field_image('qrcode', $qrcode)}
			</div>
		</div>
	</div>
</div>

<div class="panel panel-default">
	<div class="panel-heading">版权设置</div>
	<div class="panel-body">
		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span
				style='color: red'>*</span>企业名称</label>
			<div class="col-sm-9 col-xs-12">
				<input type="text" id="qyname" name="qyname" class="form-control" value="{$qyname}">
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-12 col-sm-2 col-md-2  control-label"><span
				style='color: red'>*</span>企业logo</label>
			<div class="col-sm-8">
				{php echo tpl_form_field_image('qylogo', $qylogo)}
				<span style="color:red;">正方形，建议图片大小：80*80</span>
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span
				style='color: red'>*</span>企业链接</label>
			<div class="col-sm-9 col-xs-12">
				<input type="text" id="qylink" name="qylink" class="form-control" value="{$qylink}">
			</div>
		</div>
	</div>
</div>

 -->



<div class="panel panel-default" style="display:none;">
	<div class="panel-heading">奖励设置</div>
	<div class="panel-body">
		
		<div class="form-group">
			<label class="col-xs-12 col-sm-2 col-md-2  control-label"><span style='color: red'>*</span>是否开启</label>
			<div class="col-sm-8">
				<label class="radio-inline"> 
					<input type="radio" name="isjl" value="1" {if $isjl ==1} checked="checked" {/if}/>是
				</label> 
				<label class="radio-inline"> 
					<input type="radio" name="isjl" value="0" {if $isjl ==0} checked="checked" {/if}/>否
				</label>
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label">核销码</label>
			<div class="col-sm-9 col-xs-12">
				<input type="text" id="hxnum" name="hxnum" class="form-control" value="{$hxnum}">
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-12 col-sm-2 col-md-2  control-label"><span style='color: red'>*</span>奖励方式</label>
			<div class="col-sm-8">
				<label class="radio-inline"> 
					<input type="radio" name="jltype" value="0" {if $jltype== 0} checked="checked" {/if}/>按排名
				</label>
				<label class="radio-inline"> 
				 	<input type="radio" name="jltype" value="1" {if $jltype== 1} checked="checked" {/if}/>按分数
				</label>
			</div>
		</div>
		<div class="form-group">
 			<label class="col-xs-12 col-sm-3 col-md-2 control-label"></label>
            <div class="col-sm-9 col-xs-6">
				<div class="input-group" style="width:40%;">
					<span class="input-group-addon pm">排名前</span><span class="input-group-addon fs" style="display:none;">分数达到</span>
					<input type="text" class="form-control" name="jlnum" value="{$jlnum}"/>
					<span class="input-group-addon pm">名</span><span class="input-group-addon fs" style="display:none;">分</span>
				</div>
            </div>
        </div>

        <div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label">奖励提示语</label>
			<div class="col-sm-9 col-xs-12">
				<input type="text" id="jlcontent" name="jlcontent" class="form-control" value="{$jlcontent}">
			</div>
		</div>
	</div>
</div>
<script type="text/javascript">
$("input[name='jltype']").click(function(){
	if($(this).val()==0){
		$(".pm").show();
		$(".fs").hide();
	}else{
		$(".pm").hide();
		$(".fs").show();
	}
})	
$(document).ready(function(){
	var jltype="{$jltype}";
	if(jltype=="0"){
		$(".pm").show();
		$(".fs").hide();
	}else{
		$(".pm").hide();
		$(".fs").show();
	}
})
require(['jquery', 'util'], function($, u){
	$(function(){
		u.editor($('.richtext')[0]);
	});
});
</script>